<template>
  <ul class="img-box">
    <li v-for="(item, index) in lists" @click="selNav(index)" >
      <img  v-bind:src="item.url">
      <div class="sub-main">
        <p>{{item.n}}</p>
        <div>
          <i>tip</i>
          <span>{{item.num}}</span>
        </div>
      </div>
    </li>
  </ul>
</template>

<script>
  export default{
    name:'sideNav',
    data(){
      return {
        navCheck:'',
        lists:[
          {n:'ccc',url:'./static/1.jpg',num:'123'},
          {n:'ccc',url:'./static/1.jpg',num:'123'},
          {n:'ccc',url:'./static/1.jpg',num:'123'},
          {n:'ccc',url:'./static/1.jpg',num:'123'},
        ]
      }
    },
    methods:{
      selNav:function (index) {
        this.navCheck = index;
      }
    }
  }
</script>

<style scoped lang="less">
.img-box{
  margin:0 auto;
  width:1000px;
  height:auto;
  display: flex;
  flex-flow: row wrap;
  li{
    flex:1;
    .sub-main{
      width:100%;
      height:30px;

    }
  }
}
</style>
